package com.hyt.it.ogt.kq.main.controller.gov;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hyt.common.apiInfor.ApiResponse;
import com.hyt.it.ogt.kq.common.gov.constant.ResponseCode;
import com.hyt.it.ogt.kq.main.controller.base.BaseController;
import com.hyt.it.ogt.kq.service.gov.model.entity.BackUp;
import com.hyt.it.ogt.kq.service.gov.model.param.BackUpParam;
import com.hyt.it.ogt.kq.service.gov.model.param.BehaviorAnalysisParam;
import com.hyt.it.ogt.kq.service.gov.model.vo.BackUpPageVo;
import com.hyt.it.ogt.kq.service.gov.model.vo.BehaviorAnalysisPageVo;
import com.hyt.it.ogt.kq.service.gov.service.IBackUpService;
import com.hyt.model.PageParam;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiOperationSort;
import io.swagger.annotations.ApiSort;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@Api(tags = "136.机考上传异地备份", value = "机考上传行为异地备份")
@ApiSort(value = 136)
@RequestMapping("/kw/gov/backUp")
@Slf4j
public class BackUpController extends BaseController {
    @Resource
    IBackUpService iBackUpService;

    @ApiOperationSort(value = 1)
    @ApiOperation(value = "136.1 异地备份查询", response = BackUpPageVo.class)
    @GetMapping("/queryPage")
    public ApiResponse<Page<BackUpPageVo>> queryPage(PageParam<BackUpPageVo> pageParam, BackUpParam param) {
        Page<BackUpPageVo> page = iBackUpService.queryPage(pageParam, param);
        return ApiResponse.<Page<BackUpPageVo>>builder().data(page).code(ResponseCode.SUCCESS.getCode()).build();
    }
}
